If none of the sections is allowed to display anything, it doesn't
make sense to show the message list at all, so hide it in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=745494
this._eventsSection = new EventsSection();
this._addSection(this._eventsSection);
+
+ Main.sessionMode.connect('updated', Lang.bind(this, this._sync));
},
_addSection: function(section) {
},
_sync: function() {
- let showPlaceholder = [...this._sections.keys()].every(function(s) {
+ let sections = [...this._sections.keys()];
+ let visible = sections.some(function(s) {
+ return s.allowed;
+ });
+ this.actor.visible = visible;
+ if (!visible)
+ return;
+
+ let showPlaceholder = sections.every(function(s) {
return s.empty || !s.actor.visible;
});
this._placeholder.actor.visible = showPlaceholder;